CCHW_ReplicationArchiveREADME.txt

Greetings! This is the replication archive for Campbell et. al (2018), "Therapeutic community graduates cluster together in social networks: Evidence for spatial selection as a cooperative mechanism in therapeutic communities." 

This archive is designed to be run through executing the three lines of code found in CCHW_RunFile.R.  This file only requires that you update the working directory to where the replication archive is located.  The archive contains the following code:
-CCHW_RunFile.R: This is a run file that is designed to compile all code and require minimal effort in replicating the figures and tables produced in the manuscript.  To use this file you will need to modify the working directory to the location of the replication archive.  Running this file from start to finish will call all necessary other files to produce Figures 1 through 3 and Tables 1 and 2 in the working directory selected.
-CCHW_ReplicationArchive.R: This is the script that contains all the code necessary to conduct the analyses.  This file should only be of relevance to those who are interested in seeing how analyses were conducted.  
-GraduationDataPrep.R: A script that prepares the data files (WCAttrib.csv, WCM-ledge, WCM-sedge) into usable format for the tnam function.  
-multiplot.R: A script that contains a function necessary to compile the figures into multi-paneled graphics.  This is called by CCHW_ReplicationArchive.R.
-describe.R: A script that contains a function necessary to describe each variable.  This is called by CCHW_ReplicationArchive.R.
-WCAttrib.csv: Anonymized TC member data.
-WCM-ledge: Network data.
-WCM-sedge: Network data.

If you use the run file then files corresponding to figures and tables will be produced.  

